<template>
	<view :data-id="list._id" @click="getImgDetails" class="list-img">
		<image class="g-img" :src="list.img.url" mode=""></image>
	</view>
</template>

<script>
	export default {
		name:"g-img",
		props:['list'],
		data() {
			return {
				
			};
		},
		methods:{
			getImgDetails(e){
				const id = e.currentTarget.dataset.id
				console.log(id)
				uni.navigateTo({
					url:'/pages/img-details/img-details?id='+id
				})
			}
		}
	}
</script>

<style lang="scss">
	.list-img{
		.g-img{
			width: 230rpx;
			height: 400rpx;
			border-radius: 13rpx;
		}
	}
</style>